class Post
  include DataMapper::Resource
  storage_names[:default] = "Post"
  
  property :id,               Serial
  property :title,            String,        :required => true, :length => 500
  property :icon_url,         String,        :length => 500
  property :post_category_id, Integer
  property :sector_id,        Integer
  property :summary,          String,        :required => true, :length => 500
  property :content,          Text,          :required => true, :lazy => false
  property :tags,             String,        :required => true, :length => 500
  property :created_by,       Integer
  timestamps :at

  belongs_to :post_category
  has n, :course_post
end
